import java.util.Scanner;
class Bank {
    private int money;
    private String account;

    public int getMoney() {
        return money;
    }

    public void setMoney(int money) {
        this.money = money;
    }

    public String getAccount() {
        return account;
    }

    public void setAccount(String account) {
        this.account = account;
    }

    public Bank(int money, String account) {
        this.money = money;
        this.account = account;
    }

    public boolean change(Bank bank_2,int n) {
        if (this.getMoney()<n) {
            System.out.println("转账失败!");
            System.out.println("余额("+this.getMoney()+")不足!");
            return false;
        }
        this.setMoney(this.getMoney()-n);
        bank_2.setMoney(bank_2.getMoney()+n);
        System.out.println("转账成功!");
        return true;
    }
}
public class java26
   {
    public static void main(String[] args) {
        Bank bank_1 = new Bank(1,"employee");
        Bank bank_2 = new Bank(10000,"boss");
        System.out.print("请输入你要转账的数额:");
        Scanner in=new Scanner(System.in);
        bank_2.change(bank_1, in.nextInt());
    }

}
